package com.chencs.zuul;

import com.chencs.zuul.filter.DevRouterFilter;
import com.netflix.zuul.ZuulFilter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Profile;

/**
 * Created by chencs on 2017/5/26.
 */

@SpringBootApplication
@EnableZuulProxy
@ComponentScan(basePackages={"com.chencs"})
public class ZuulGateWayApplication {

    @Bean
    @Profile("default")
    public ZuulFilter devRouterFilter(){
        return new DevRouterFilter();
    }


    public static void main(String[] args) {
        SpringApplication.run(ZuulGateWayApplication.class, args);
    }
}
